<div class="col-md-9"  style="border: 1px solid #eee; min-height: 400px;">
    <div class="form_filter_search">
    </div>
    <div id="" style="padding-left: 50px; padding-top: 30px">
        <form action="<?= site_url(); ?>/kemiskinan/upload_xml_kemiskinan" method="post"
              enctype="multipart/form-data">
            <div style="display:none">
                <input type="file" id="input_berkas" accept=".xml" class="button" name="input_berkas[]" multiple=""/>
            </div>
            <input type="button" id="tombol_pilih_berkas" class="btn btn-warning" value="Pilih Berkas XML"/>
            <div style="padding-top: 5px; padding-bottom: 10px">
                <table id="tabel_list_file"></table>
                </div>
            <input type="submit" value="Upload" class="btn btn-info"/>
        </form>
    </div>
    <div>
    <?php
    if(isset($data_upload_xml)){
        //var_dump($data_upload_xml);
    }
    ?>
        </div>
</div>  
</div>
</div> 
</section>
<script>
    $(document).ready(function() {
        $('#tombol_pilih_berkas').on('click', function() {
            $('#input_berkas').click();
        });
        $('#input_berkas').on('change',function(){
            var list_berkas=$('#input_berkas')[0].files;
            //console.log(list_berkas);
            //console.log('panjang array : ' + list_berkas.length);
            var tabel_file = $('#tabel_list_file');
            tabel_file.html('');
            for(var i=0;i<list_berkas.length;i++){
                var berkas=list_berkas[i];
                //console.log(berkas);
                tabel_file.append('<tr><td>'+berkas.name+'</td></tr>');
            }
        });
    });
</script>
